package au.id.wattle.chapman.j2as3;

public class Token {
	public static final String STRING_LITERAL = "string literal";
	public static final String SYMBOL = "symbol";
	public static final String STRING = "string";
	public static final String CHAR = "char";
	public static final String NUMBER = "number";
	public static final String KEYWORD = "keyword";
	public static final String COMMENT = "comment";
	
	private String string;
	private String type;
	private int pos;
	
	
	public String getString() {
		return string;
	}

	public void setString(String string) {
		this.string = string;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public int getPos() {
		return pos;
	}

	public void setPos(int pos) {
		this.pos = pos;
	}

	public Token(String string, String type, int endPos) {
		this.string = string;
		this.type = type;
		this.pos = endPos - string.length();
	}
	
	public String toString() {
		return string;
	}
}
